﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Mechanics.GameEventMechanics {
    import Mechanics.GameMechanicInterfaces.*;
    import Mechanics.*;
    import Classes.*;
    import Display.*;

    public class ExampleMechanicImplementation implements IClickCounter {

        private var m_owner:MechanicMapResource;
        private var m_config:MechanicConfigData;

        public function hasOverrideForGameAction(_arg1:String):Boolean{
            return (true);
        }
        public function executeOverrideForGameEvent(_arg1:String, _arg2:Array=null):MechanicActionResult{
            var _local3:int = int(this.m_owner.getDataForMechanic(this.m_config.type));
            UI.displayMessage(("Number of clicks to this resource: " + _local3));
            _local3++;
            this.m_owner.setDataForMechanic(this.m_config.type, _local3);
            return (new MechanicActionResult(true, false, true, {numClicks:1}));
        }
        public function initialize(_arg1:IMechanicUser, _arg2:MechanicConfigData):void{
            this.m_owner = (_arg1 as MechanicMapResource);
            this.m_config = _arg2;
        }
        public function getClickCount():int{
            return (int(this.m_owner.getDataForMechanic(this.m_config.type)));
        }
        public function isVisitEnabled():Boolean{
            return (false);
        }

    }
}//package Mechanics.GameEventMechanics 
